<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>E-空间转换2D和3D</title>
    <style>
        body{
            perspective: 500px;
            transform-style: preserve-3d;
        }
        .commn{
            width:100px;
            height:100px;
            text-align: center;
            line-height: 100px;
            background:#f2f2f2;
            border:1px solid #ccc;
            position: absolute;
            top: 0;
            left: 0;

        }
        .demo{
            z-index: 1;
            opacity: .5;
            background: red;
        }
        .demo-3d{
            transform:translate3d(100px  ,100px ,-100px) rotateZ(45deg);

        }
    </style>
</head>
<body>

<div class="commn demo">transfrom3d-1</div>
<div class="commn demo-3d">transfrom3d-2</div>

</body>
</html>